<!--
auth: 徐剑锋
-->
<html>
<head>
    <link rel="stylesheet" href="<?php echo IMG_PATH ?>admin/common.css?<?php echo STATIC_VER ?>">
    <link rel="stylesheet" href="<?php echo IMG_PATH ?>admin/bootstrap.min.css">
    <script>SITE_PATH='<?php echo SITE_PATH ?>';</script>
    <title>监控订单 - 千纸鹤管理平台</title>
    <style>
        th{font-size: 18px;text-align: center;}
        td{font-size: 16px;text-align: center;padding:5px 10px;;}
        tr:nth-child(odd){background:#F0F8FF;}
        td:hover{};

        .showpage{width:100%; height:30px;text-align:center; line-height: 30px;float:left;font-size:16px;margin:10px 0;}

        .showpage a , .showpage .current{ border:1px dashed #f1f4f6;font-size:14px; font-family:arial; margin:0 1px;}
        .showpage a ,  .current{ padding:2px 6px;}
        .showpage .current, .showpage a:hover{ border:1px solid blue;text-decoration:none;}
    </style>
</head>
<body>

<?php
echo $header;
date_default_timezone_set('PRC');
?>

<div id="body" style="width:100%;">
    <div style="font-size:18px;margin:5px 0;">当前位置：报表＞＞充值记录（当前用户：<?php echo isset($myName)?$myName:'';?>）</div>
    <a style="font-size:18px;margin:5px 0;cursor:pointer;" id="toback"><<返回</a>
    <form action="/admin/finances/ReportPrepaidRecord" method="get" id="searchForm">
        <div style="width:100%;height:60px; border-bottom:1px solid gray;">

            <div style="height:60px;width:74%;float:left;">

                <div style="height:33px;width:110%;" >
                    <div style="float:left;font-size:18px;margin:5px 0;">搜索条件>>  </div>
                    <div style="float:left;margin:5px 15px;font-size:16px;">时间：从<input type="text" name="startTime" onClick="WdatePicker();" autocomplete="false"value="<?php echo isset($search['startTime'])?$search['startTime']:'';?>"/>到<input type="text" name="endTime" onClick="WdatePicker();" autocomplete="false"value="<?php echo isset($search['endTime'])?$search['endTime']:'';?>"/></div>
                    <div style="float:left;"><input type="submit"  class="btn btn-primary" value="搜索" /> </div>
                    <div style="float:left;margin-left:20px;">
                        <a class="btn btn-info" href="/admin/finances/ReportPrepaidRecord">清空</a>
                    </div>
                </div>
            </div>
    </form>

</div>

<?php if(isset($errors) || (isset($_GET['err']) && $errors=$_GET['err'])){ ?>
    <div class="alert alert-error"style="width:40%;padding: 15px 0;  text-align: center; color: red;background: pink;margin-left: 29%;margin-bottom: 10px;">
        <?php echo $errors;?>
    </div>
<?php }?>

<div class="showpage"style="margin:10px 5px;"><?php echo isset($pages)?$pages:'';?></div>
<div style="width:100%;min-height:100%;">
    <div style="font-size:18px;color:royalblue;">合计充值总金额为：<?php echo isset($total)?$total:'';?>元</div>

    <table width="96%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #D4D4D4;">
        <tbody id="listTBody">
        <tr>
            <th>ID</th>
            <th>充值对象</th>
            <th>充值金额</th>
            <th>充值时间</th>
            <th>操作人员</th>
        </tr>
    <?php
    if(isset($datas) && count($datas)) {
        $i = isset($_GET['page']) ? ($_GET['page'] - 1) * 3 + 1 : 1;
        date_default_timezone_set('PRC');
        foreach($datas as $data) { ?>
        <tr>
            <td><?php echo $data['id'];?></td>
            <td><?php echo $data['rname1'];?></td>
            <td><?php echo $data['price'];?>元</td>
            <td><?php echo date('Y-m-d H:i:s',$data['time_add']);?></td>
            <td><?php echo $data['rname2'];?></td>
        </tr>
        <?php }
    }else {
        echo '<tr><td colspan="5">查无数据</td></tr>';
    }
    ?>
        </tbody>
    </table>

    <div class="showpage" style="margin-top:15px;"><?php echo isset($pages)?$pages:'';?></div>
</div>

<script src="http://static.caocaod.com/libs/jquery/jquery-2.2.3.min.js"></script>
<script src="<?php echo IMG_PATH ?>admin/bootstrap.min.js"></script>
<script  src="<?php echo IMG_PATH ?>com/My97DatePicker/WdatePicker.js"></script>
<script>
    $('.num,.first,.prev,.next,.end').click(function() {
        window.location.href = location.href.split('?')[0]+'?page='+$(this).attr('page');
    })

    $('#toback').click(function() {
        window.location.href= SITE_PATH + 'admin/finances/main';
    })

</script>

</body>
</html>